In a virtual datacenter, application services can be deployed based on application topologies/blueprints, which describe virtual computing resources and application components to he executed on the virtual computing resources. For example, an application topology/blueprint can describe one or more virtual machines (VMs) and software application components to be executed on the VMs. Virtual computing resources, such as VMs, defined in application topologies/blueprints are provisioned with custom parameters for computing power, storage and operating system.
In some conventional virtualized infrastructures, affinity-type rules are manually created by an administrator to specify the placement of virtual computer resources onto host computers. However, since there can be hundreds or even thousands of clients running in some virtualized infrastructures, manually creating affinity-type rules for some of these clients can be overwhelming. For example, if an application blueprint describes multiple database nodes that rely heavily on disk Input/Output (I/O), an administrator needs to manually place the database nodes on separate hosts. Similarly, to avoid network traffic bottlenecks, an administrator needs to manually place two firewall VMs on separate hosts.